<%--
  Created by IntelliJ IDEA.
  User: asus
  Date: 2019/7/18
  Time: 20:57
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>layout 后台大布局 - Layui</title>
    <link rel="stylesheet" href="../layui/css/layui.css">
        <%Object name = request.getSession().getAttribute("username");%>

    <script  type="text/javascript">

        if(<%=name==null%>)
        {
            window.onload = function () {
                window.alert('请您先登录');

                window.stop();
                window.location.href = "Login.jsp";
            }
        }
        function dengchu() {

            window.location.href = "Login.jsp";
        }
    </script>
</head>

<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo" >后台管理系统<%=name%></div>
        <!-- 头部区域（可配合layui已有的水平导航） -->

        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item" onclick="dengchu()">退出</li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree"  lay-filter="test">
                <li class="layui-nav-item layui-nav-itemed">
                    <a href="javascript:;" id="changeToSet5">用户管理</a>
                    <dl class="layui-nav-child" >
                        <dd><a href="javascript:;" id="changeToSet3">用户列表</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;">文章管理</a>
                    <dl class="layui-nav-child">
                        <dd id="changeToSet"><a href="javascript:;">栏目管理</a></dd>
                        <dd id="changeToSet1"> <a href="javascript:;">文章列表</a></dd>
                        <dd><a href="javascript:;"id="changeToSet4" >文章审核</a></dd>
                    </dl>
                </li>

            </ul>
        </div>
    </div>

    <div class="layui-body" >

        <iframe src="Success.jsp" frameborder="0" id="contentIframe" width="100%" height="95%" ></iframe>
    </div>

</div>
<script src="../Js/jquery.min.js"></script>
<script src="../layui/layui.js"></script>
<script>
    //JavaScript代码区域
    layui.use('element', function(){
        var element = layui.element;

    });
    $(function(){
        $('#changeToSet3').on('click',function(){
            $(window.parent.document).find('#contentIframe').attr('src','lanmu.html')
            $(this).addClass('layui-this').siblings().removeClass('layui-this');
        })
    });
    $(function(){
        $('#changeToSet3').on('click',function(){
            $(window.parent.document).find('#contentIframe').attr('src','lanmu.html')
            $(this).addClass('layui-this').siblings().removeClass('layui-this');
        })
    });
    $(function(){
        $('#changeToSet').on('click',function(){
            $(window.parent.document).find('#contentIframe').attr('src','lanmu.jsp')
            $(this).addClass('layui-this').siblings().removeClass('layui-this');
        })
    });
    $(function(){
        $('#changeToSet5').on('click',function(){
            $(window.parent.document).find('#contentIframe').attr('src','Success.jsp')
            $(this).addClass('layui-this').siblings().removeClass('layui-this');
        })
    });
    $(function(){
        $('#changeToSet4').on('click',function(){
            $(window.parent.document).find('#contentIframe').attr('src','yonghu.html')
            $(this).addClass('layui-this').siblings().removeClass('layui-this');
        })
    });
    $(function(){
        $('#changeToSet1').on('click',function(){
            $(window.parent.document).find('#contentIframe').attr('src','yonghu.html')
            $(this).addClass('layui-this').siblings().removeClass('layui-this');
        })
    });

</script>
</body>
</html>